package com.learn.template;

public class Man extends Human{
    private boolean hasBabyFlag = false;

    @Override
    public void eat() {
        System.out.println("man eat");
    }

    @Override
    public void drink() {
        System.out.println("man drink");
    }

    @Override
    public void speak() {
        System.out.println("man speak");
    }

    @Override
    protected boolean hasBaby() {
        return this.hasBabyFlag;
    }

    public void setHasBaby(boolean hasBaby) {
        this.hasBabyFlag = hasBaby;
    }
}
